/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bo;

import beans.BookBean;
import java.util.ArrayList;
import mapper.BookMapper;

/**
 *
 * @author Haomaru
 */
public class BookBO {
    public void insertNewBook(BookBean newBook) throws Exception {
		BookMapper mapper = null;
		try {
			mapper = new BookMapper();
			mapper.insertNewBook(newBook);
		}
		catch (Exception e) {
			throw e;
		}
	}
	
	public BookBean getBookInformation(String isbn) throws Exception {
		BookMapper mapper = null;
		try {
			mapper = new BookMapper();
			return mapper.getBookInformation(isbn);
		}
		catch (Exception e) {
			throw e;
		}
	}
	
	public ArrayList<BookBean> listBook() throws Exception {
		BookMapper mapper = null;
		try {
			mapper = new BookMapper();
			return mapper.listBook();
		}
		catch (Exception e) {
			throw e;
		}
	}
}
